package kamkor.ann.namerecog.network

import org.encog.neural.data.NeuralDataSet

/**
 * Describes basic neural network functionality
 * 
 * @param T type if input
 * @param V type of output
 * @author kamkor  
 * @since 1.0.0 
 *
 */
trait INetwork[T, V] {
	
	/** Computes input of type T and returns output of type V
	 * @param input
	 * @return output
	 */
	def compute(input: T): V
	
	/** 
	 * @param trainingData
	 */
	def setTraining(trainingData: NeuralDataSet)
	
	/**
	 * Does 1 training iteration over the training data set.
	 */
	def train()
	
	/**
	 * @return Current error percent from the training.  
	 */
	def getError(): Double
}